package cn.uyunsky.platform.jaxb;

import java.io.InputStream;
import java.io.Reader;
import java.io.Writer;

public interface XmlConvert {

	/**
	 * 将输入的xml转换为bean
	 * @param <T>
	 * @param reader
	 * @return
	 */
	public <T> T unpack(Class<T> clazz, Reader reader);

	/**
	 * 将输入的xml转换为bean
	 * @param <T>
	 * @param in
	 * @return
	 */
	public <T> T unpack(Class<T> clazz, InputStream in);

	/**
	 * 将bean转换为xml
	 * @param bean
	 * @param writer
	 */
	public void pack(Object bean, Writer writer);

}
